package org.lanqiao.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.lanqiao.service.FactoryService;

public class AddNewCourse extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//获取课程及ID和名字
		String couid=request.getParameter("couid");
		
		String couname=request.getParameter("couname");
		
		List allC=FactoryService.getUserInfoManageService().getAllCourse(couid,couname);
		
		request.getSession().setAttribute("TeacherAllCourse", allC);
		//把数据传递给课程显示界面
		request.getRequestDispatcher("logined/UserInfoManager/teacherCourse.jsp").forward(request, response);
	}
	
	

}
